package binary;

public class Binary_Hex_Demo {
    public static void main(String[] args) {
        int a=0b0010_0010_0101_0101;//2进制
        int b=0x2255;//16进制
        System.out.println(a==b);
        //Integer.toBinaryString()可以将底层2进制数返回
        System.out.println(Integer.toBinaryString(b));
        //Integer.toHexString()可以将16进制数返回
        System.out.println(Integer.toHexString(a));
        //返回10进制
        System.out.println(a);
        System.out.println(b);
    }
}
